package com.handinglian.ai.record.service;

import com.handinglian.ai.common.dto.CommonPage;
import com.handinglian.ai.notice.param.DtmfCollectParam;
import com.handinglian.ai.record.dto.CallRecordDetailDto;
import com.handinglian.ai.record.dto.CallRecordDto;
import com.handinglian.ai.record.param.CallRecordCreateParam;
import com.handinglian.ai.record.param.CallRecordPbxCreareParam;
import com.handinglian.ai.record.param.PushAiCallParam;
import com.handinglian.ai.system.dto.AnswerDto;
import com.handinglian.ai.thirdparty.dto.YyDtmfCollectDto;

import java.io.IOException;
import java.util.List;

public interface CallRecordService {
    /**
     * 推送呼叫中心通话记录
     * @author pxl
     * @param callRecordCreateParams
     * @return int 返回0为推送失败 其他为推送成功
     * @date 2019/8/22 14:23
     */
    int pushCdrInfo(List<CallRecordCreateParam> callRecordCreateParams);

    /**
     * 推送pbx通话记录
     */
    int pushCdrPbx(List<CallRecordPbxCreareParam> creareParams);

    CommonPage<CallRecordDto> listPage(String startDate, String endDate, String callerNo, String calledNo, String recordStatus, String phoneStatus, String sortField, String sortOrder, Integer pageNum, Integer pageSize);

    CallRecordDetailDto getDetail(Integer id);

    CallRecordDetailDto getDetail(String callid);

    String download(String callid) throws IOException;

    int pushdtmf(String callee, String dtmf, String requestUUID);

    void dtmfCollect(DtmfCollectParam dtmfCollectParam) throws IOException;

    Integer countActualNum(Integer noticeId);

    Integer sumCallInDurationTime();

    Integer countCallIn();

    Integer countCallInDaily();

    Integer countCallOut();

    Integer countCallOutAnswer();

    List<AnswerDto> countAnswerYearly();
}
